home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / IN973824.ZIP / INC.TXT < prev   
Text File  |  1998-07-28  |  12KB  |  222 lines

  1.  
  2. Free Information Xchange '98 presents:
  3.  
  4. Incoming - CD crack by Static Vengeance
  5.  
  6. Requirements:
  7. Hex Editor and Full Install
  8. W32Dasm if you want to follow along
  9.  
  10.    NOTE:  I'm using the bundled version of Incoming that came with my CL Voodoo2 card.  The retail
  11. version MAY be slightly different and I don't know if edits listed will work with any other version
  12. of Incoming.  However, the SAME process will work for "all" other versions of Incoming.
  13.  
  14.     Incoming a great little game the really shows off my Voodoo2 card.  Great graphics and effects
  15. makes for a great game.  However there is a little bug I have run into with Incoming, a bug that must
  16. be FiX'ed before I can fully enjoy the game.  The bug I'm talking about is the CD check (actually it
  17. has multiply CD checks) you run into before you can play a game.  So I loaded up W32Dasm from RUSoft
  18. and disassembled Incoming to remove the CD checks.  When you run the game without the CD present you
  19. get a little Win95 pop up dialog that says "CD not present." and you're dumped back to Win95.  So I
  20. went up to the menu bar and selected "Refs" then selected "String data references" from the drop down
  21. menu.  Once the string refs box came up I grabbed the slider bar and scrolled down to "CD not present"
  22. and double clicked on it.  This put me in middle of this section of code:
  23.  
  24. :0042675E E84FABFDFF              call 004012B2
  25. :00426763 85C0                    test eax, eax
  26. :00426765 0F8457030000            je 00426AC2
  27. :0042676B 8B0DE01F6700            mov ecx, dword ptr [00671FE0]
  28. :00426771 E893AEFDFF              call 00401609                 <-- Some type of check for the CD?
  29. :00426776 85C0                    test eax, eax                 <-- Test the result returned in eax
  30. :00426778 750D                    jne 00426787                  <-- Take this to jump over the "bad" code
  31.  
  32. * Possible StringData Ref from Data Obj ->"CD not present."     <-- One thing we don't want to see pop up
  33.                                   |
  34. :0042677A 68544B4800              push 00484B54
  35. :0042677F E896ACFDFF              call 0040141A
  36. :00426784 83C404                  add esp, 00000004
  37.  
  38. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  39. |:00426778(C)
  40. |
  41. :00426787 8B4D10                  mov ecx, dword ptr [ebp+10]   <-- Continue with the game
  42. :0042678A E8A1040000              call 00426C30
  43. :0042678F 85C0                    test eax, eax
  44. :00426791 0F842B030000            je 00426AC2
  45. :00426797 897D98                  mov dword ptr [ebp-68], edi
  46. :0042679A 8B15E01F6700            mov edx, dword ptr [00671FE0]
  47. :004267A0 8BCE                    mov ecx, esi
  48. :004267A2 E8CAAAFDFF              call 00401271
  49.  
  50.     Having a call, a test and a conditional jump right before it prints the "CD not present." string
  51. means we need to check out the call to 401609.  At 401609 you see it just jumps to 427960.  So let's check
  52. out that section of code and see what it does:
  53.  
  54. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  55. |:00401609(U)
  56. |
  57. :00427960 83EC2C                  sub esp, 0000002C
  58. :00427963 56                      push esi
  59.  
  60. * Reference To: WINMM.mciSendCommandA, Ord:0032h                <-- This is all I need to see
  61.                                   |
  62. :00427964 8B35A0B9B300            mov esi, dword ptr [00B3B9A0]
  63. :0042796A 57                      push edi
  64. :0042796B 8D442420                lea eax, dword ptr [esp+20]
  65. :0042796F 50                      push eax
  66. :00427970 6802300000              push 00003002
  67. :00427975 890DA04E6700            mov dword ptr [00674EA0], ecx
  68. :0042797B 890D984A6700            mov dword ptr [00674A98], ecx
  69.   --  More code to this routine  --
  70.  
  71.     You can see Incoming checks for the CD via calls through the Windows Multi-Media (WINMM) DLL.  As
  72. long as there is no special value returned we can overwrite the call 401609 (E8 93 AE FD FF) with
  73. mov eax, 00000001 (B8 01 00 00 00).  This will force the conditional jump to always be taken and prevent
  74. Incoming from checking for the CD through the code at 427960.  So I ran Incoming and it started loading...
  75. loading further but up pops the "CD not present" warning.  So there is another call to the CD check or
  76. a second routine that checks for the CD.  Back to the disassembled listing and backing to looking for more
  77. clues.  Listing through the imported DLL list you see the KERNEL32 calls.  Scrolling down the list you'll
  78. see the GetDriveTypeA call being used.  The most common place I have seen that call used is in CD checks.
  79. Using the "Find Text" function of W32Dasm I searched for GetDriveTypeA and was rewarded with this:
  80.  
  81. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  82. |:004016D6(U)
  83. |
  84. :0043E220 A19C805400              mov eax, dword ptr [0054809C]       <-- Load some kind of flag value
  85. :0043E225 85C0                    test eax, eax                       <-- Test it
  86. :0043E227 56                      push esi                            <-- If we push it we HAVE to pull it!
  87. :0043E228 0F85AE000000            jne 0043E2DC                        <-- Jump if not zero to a return
  88. :0043E22E 803DB8C548005A          cmp byte ptr [0048C5B8], 5A
  89. :0043E235 C7059C80540001000000    mov dword ptr [0054809C], 00000001  <-- Setting the flag to 00000001
  90. :0043E23F 744F                    je 0043E290                         <-- We'll make use of this jump
  91.  
  92. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DFh                     <-- Text string that got us here
  93.                                   |
  94. :0043E241 8B3514B8B300            mov esi, dword ptr [00B3B814]
  95.  
  96. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  97. |:0043E283(U)
  98. |
  99.  
  100. * Possible StringData Ref from Data Obj ->"D:\"                      <-- Start with D drive as CD rom
  101.                                   |
  102. :0043E247 68B8C54800              push 0048C5B8
  103. :0043E24C FFD6                    call esi
  104. :0043E24E 83F805                  cmp eax, 00000005                  <-- 05 is the value for CD Rom drives
  105. :0043E251 7520                    jne 0043E273
  106. :0043E253 A0B8C54800              mov al, byte ptr [0048C5B8]
  107.  
  108. * Possible StringData Ref from Data Obj ->"r"                        <-- Set up for a read
  109.                                   |
  110. :0043E258 6824194900              push 00491924
  111.  
  112. * Possible StringData Ref from Data Obj ->"D:\rage.ico"              <-- The file on the CD to check for
  113.                                   |
  114. :0043E25D 68C0C54800              push 0048C5C0
  115. :0043E262 A2C0C54800              mov byte ptr [0048C5C0], al
  116. :0043E267 E8D4BD0200              call 0046A040
  117. :0043E26C 83C408                  add esp, 00000008
  118. :0043E26F 85C0                    test eax, eax
  119. :0043E271 7512                    jne 0043E285                       <-- Take this jump for a GOOD CD check
  120.  
  121. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  122. |:0043E251(C)
  123. |
  124. :0043E273 A0B8C54800              mov al, byte ptr [0048C5B8]
  125. :0043E278 FEC0                    inc al
  126. :0043E27A 3C5A                    cmp al, 5A                        <-- Check up to 5Ah times
  127. :0043E27C A2B8C54800              mov byte ptr [0048C5B8], al
  128. :0043E281 740D                    je 0043E290                       <-- Failed too many times
  129. :0043E283 EBC2                    jmp 0043E247                      <-- Go back up and try again
  130.  
  131. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  132. |:0043E271(C)
  133. |
  134. :0043E285 50                      push eax                         <-- Getting here is good CD check
  135. :0043E286 E8C5BB0200              call 00469E50
  136. :0043E28B 83C404                  add esp, 00000004
  137. :0043E28E 5E                      pop esi                          <-- We NEED to get here from our jump!!
  138. :0043E28F C3                      ret
  139.  
  140. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:  <-- Getting here means CD check failed
  141. |:0043E23F(C), :0043E281(C)
  142. |
  143. :0043E290 8B0DF85B4A00            mov ecx, dword ptr [004A5BF8]
  144. :0043E296 51                      push ecx
  145.  
  146. * Possible StringData Ref from Data Obj ->"%s"
  147.                                   |
  148. :0043E297 6898224800              push 00482298
  149. :0043E29C 6898164A00              push 004A1698
  150.  
  151. * Reference To: USER32.wsprintfA, Ord:0264h
  152.                                   |
  153. :0043E2A1 FF158CB8B300            Call dword ptr [00B3B88C]
  154. :0043E2A7 83C40C                  add esp, 0000000C
  155. :0043E2AA E8D837FCFF              call 00401A87
  156. :0043E2AF 6A00                    push 00000000
  157.  
  158. * Possible StringData Ref from Data Obj ->"Incoming Error Report."   <-- Header for No CD present
  159.                                   |
  160. :0043E2B1 68545E4800              push 00485E54
  161. :0043E2B6 6898164A00              push 004A1698
  162. :0043E2BB 6A00                    push 00000000
  163.  
  164. * Reference To: USER32.MessageBoxA, Ord:0195h
  165.                                   |
  166. :0043E2BD FF15F8B8B300            Call dword ptr [00B3B8F8]
  167. :0043E2C3 8B15E01F6700            mov edx, dword ptr [00671FE0]
  168. :0043E2C9 6A00                    push 00000000
  169. :0043E2CB 68439C0000              push 00009C43
  170. :0043E2D0 6811010000              push 00000111
  171. :0043E2D5 52                      push edx
  172.  
  173. * Reference To: USER32.SendMessageA, Ord:01DAh
  174.                                   |
  175. :0043E2D6 FF1548B9B300            Call dword ptr [00B3B948]
  176.  
  177. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  178. |:0043E228(C)
  179. |
  180. :0043E2DC 5E                      pop esi
  181. :0043E2DD C3                      ret                               <-- Finally return
  182.  
  183.     The best way I can see to bypass this routine would be to kill the call to the above section of
  184. code.  I traced back and found jump to jump to jump with no easy way to kill the call to this CD check.
  185. Instead I thought I would use the conditional jump at 43E23F to get us down to where we need to be.
  186. Because the code does a push esi we need to get to the line that does the pop esi.  The conditional jump
  187. I chose actually jumps two (2) bytes beyond the place we want to get to.  Changing this to a standard
  188. jump with the right offset would be a simple crack for this one.  The whole reason I chose the second
  189. conditional jump and not the jne long (0F 85 AE 00 00 00) at 43E228 was the code checks a flag then turns
  190. around and sets the flag.  Why not let the code set the flag for us and then bypass the rest of the code!
  191. You never know when some other part of the game will also check that flag value for 00000001.  Anyways,
  192. to contine there is another exact copy of the above CD check at 43EAC0 and the same type of edit will
  193. bypass it as well.  I installed the different language versions of Incoming and all seem to be using the
  194. same exe file so I only need to give one set of edits for all the different language installs.  The only
  195. thing left to do is to make the actual edits to the file:
  196.  
  197. Edit incoming.exe
  198. =============================================
  199. Search for: E8 93 AE FD FF  at offset 154,481
  200. Change to : B8 01 00 00 00
  201.  
  202.    At offset 251,453 -AND- offset 253,661
  203.  
  204. Search for: 3C 5A 74 4F 8B
  205. Change to : -- -- EB 4D --
  206.  
  207. For the OEM update 2/Cyrix patch
  208. Edit incoming.exe
  209. =============================================
  210. Search for: E8 D6 0C 00 00  at offset 116,565
  211. Change to : B8 01 00 00 00
  212.  
  213. Search for: 3C 5A 74 4F 8B  at offset 194,889
  214. Change to : -- -- EB 4C --
  215.  
  216. Search for: 3C 5A 74 4C     at offset 196,489
  217. Change to : -- -- EB 5B
  218.  
  219.     It was a little bit more work than the average CD check, but Incoming is now FiX'ed
  220.  
  221. Static Vengeance
  222.